<template>
	<view class="work-container">
		<u-cell-group>
			<u-cell icon="edit-pen-fill" :iconStyle="{'color': '#38ff59'}" :isLink="true" title="学校自查审核"
				url="/pages/work/workCheck/actives"></u-cell>
			<u-cell icon="eye-fill" :iconStyle="{'color': '#ffaa00'}" :isLink="true" title="现场视导详情"
				url="/pages/work/viewDetail/viewSchool">
				<u-badge slot="value" max="99" :value="uncommittedNum"></u-badge>
			</u-cell>
			<u-cell icon="file-text" :iconStyle="{'color': '#e354ff'}" :isLink="true" title="督导报告"
				url="/pages/work/supervisionReport/report-actives"></u-cell>
			<u-cell icon="email" :iconStyle="{'color': '#ffaa00'}" :isLink="true" title="整改通知书"
				url="/pages/work/rectifyNotice/notice-actives"></u-cell>
			<u-cell icon="order" :iconStyle="{'color': '#ff0000'}" :isLink="true" title="各组实时记录"
				url="/pages/work/supervisionGroupRecord/check-record"></u-cell>
			<u-cell icon="integral-fill" :iconStyle="{'color': '#aaffff'}" :isLink="true" title="学校整改反馈"
				url="/pages/work/schoolFeedback/actives"></u-cell>
		</u-cell-group>
	</view>
</template>

<script>
	import {
		uncommitted
	} from "@/api/supervise/index.js"
	export default {
		data() {
			return {
				uncommittedNum: 0
			}
		},
		onLoad() {},
		methods: {
			uncommitted() {
				uncommitted().then(res => {
					if (res.status === 0) {
						this.uncommittedNum = res.number;
					}
				});
			}
		},
		/**
		 * 监听 TabBar 切换点击 
		 */
		onTabItemTap: function(item) {
			this.uncommitted();
		},
	}
</script>

<style lang="scss" scoped>
	@media screen and (min-width: 500px) {
		.uni-swiper-dot-box {
			width: 400px;
			/* #ifndef APP-NVUE */
			margin: 0 auto;
			/* #endif */
			margin-top: 8px;
		}
	}
</style>